public class hano {
    public static void hano(int n,char a,char b,char c) {
        if(n>0) {
            hano(n-1,a,c,b);
            move(a,c);
            hano(n-1,b,a,c);
        }
    }

    private static void move(char a, char b) {
        System.out.println(a+"->"+b);
    }

    public static void main(String[] args) {
        hano(2,'a','b','c');
        System.out.println("jjjj".toCharArray()[3]);
    }
}
